<!--
 * @Descripttion: 
 * @version: 1.0
 * @Author: Sam
 * @Date: 2020-08-31 09:02:17
 * @LastEditors: Sam
 * @LastEditTime: 2020-09-01 10:08:41
-->
{extend name="public/container"}
{block name="content"}
<div class="row">
    <div class="col-sm-12">
        <div class="ibox float-e-margins">
            <div class="tabs-container ibox-title">
                <ul class="nav nav-tabs">
                    {foreach name="group_list" item="v" key="k"}
                    <li  {if condition="$k==$inc_type"}class="active"{/if}>
                        <a href="{:url('setting.SystemConfig/index',['inc_type'=> $k])}"><span>{$v}</span></a>
                    </li>
                     {/foreach}
                </ul>
               
                <div class="tab-content">
                   
                    <div class="p-m m-t-sm">
                       
                        <form class="layui-form" action="{:url('set_handle')}" method="POST">
                            <div class="layui-form-item  col-md-6">
                              <label class="layui-form-label">网站名称</label>
                              <div class="layui-input-block">
                                <input type="text" name="site_name" required  value="{$config?$config.site_name:''}" lay-verify="required" placeholder="请输入标题" autocomplete="off" class="layui-input">
                              </div>
                            </div>
                           
                            <div class="layui-form-item col-md-6">
                                    <label class="layui-form-label">网站地址</label>
                                    <div class="layui-input-block">
                                      <input type="text" name="site_url" required  value="{$config?$config.site_url:''}" lay-verify="required" placeholder="请输入标题" autocomplete="off" class="layui-input">
                                    </div>
                            </div>
                                 
                            <div class="layui-form-item col-md-6">
                                    <label class="layui-form-label">联系电话</label>
                                    <div class="layui-input-block">
                                      <input type="text" name="site_phone" required value="{$config?$config.site_phone:''}"  lay-verify="required" placeholder="请输入标题" autocomplete="off" class="layui-input">
                                    </div>
                            </div>
                            <input type="hidden" name="inc_type" value="{$inc_type}">
                            <div class="layui-form-item type" id="upload" style="display: block;">
                
                                <label class="layui-form-label">图片上传</label>
                                <div class="layui-input-block">
                                    <a class="layui-btn" onClick="upload_img()"   type="button"><i class="layui-icon layui-icon-add-circle"></i>上传图片
                                    </a>
                                    <div class="albumList" id="albumList">
                                        {if isset($config) && $config.thumb!=''}
                                            <div class="album">
                                                <img src="{$config.thumb}" alt="图片" lay-src="{$config.thumb}" data-tips-image>
                                                <p class="layui-btn layui-btn-normal" style="display: block;" onclick="del_img(this)">删除</p>
                                            </div>
                                        {/if}
                                    </div>
                                </div>
                                
                            </div>

                            <div class="layui-form-item">
                              <div class="layui-input-block">
                                <button class="layui-btn" lay-submit lay-filter="ajax_form_submit">立即提交</button>
                              </div>
                            </div>
                          </form>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<script src="{__ADMIN_PATH__}js/layuiList.js"></script>
{/block}
